<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="tiles"  uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags"%>


<div class="newAll">
	<h3 class="mar_b_20">ALL NEWS LIST</h3>
	<s:if test="freelist.size() <= 0 && eventlist.size() <= 0 && jlist.size() <= 0 && ladylist.size() <= 0 && manlist.size() <= 0 ">
	<p class="align_c mar_b_20">등록된 게시물이 없습니다</p>
	</s:if>
	<ul class="newList">
		<s:iterator value="freelist" status="stat">
		<li>
			<s:url id="viewURL" action="viewAction" >
				<s:param name="no">
					<s:property value="no" />
				</s:param> 
				<s:param name="currentPage">
					<s:property value="currentPage" />
				</s:param>
			</s:url>
			<s:if test="#session.session_id == null">
				<span class="float_l"><b>free</b> <s:property value="subject"/></span>
			</s:if>	
			<s:else>
			<span class="float_l"><b>free</b> <s:a href ="%{viewURL}"><s:property value="subject"/></s:a></span>
			</s:else>
				<span class="float_r date"><s:property value="regdate"/></span>
		</li>
		</s:iterator>
		<s:iterator value="eventlist" status="stat">
		<li>
			<s:url id="eventviewURL" action="EviewAction" >
				<s:param name="no">
					<s:property value="no" />
				</s:param> 
				<s:param name="currentPage">
					<s:property value="currentPage" />
				</s:param>
			</s:url>
			<s:if test="#session.session_id == null">
				<span class="float_l"><b>event</b> <s:property value="subject"/></span>
			</s:if>
			<s:else>
			<span class="float_l"><b>event</b> <s:a href ="%{eventviewURL}"><s:property value="subject"/></s:a></span>
			</s:else>	
				<span class="float_r date"><s:property value="regdate"/></span>
		</li>
		</s:iterator>
		<s:iterator value="jlist" status="stat">
		<li>
			<s:url id="juviewURL" action="JviewAction" >
				<s:param name="no">
					<s:property value="no" />
				</s:param> 
				<s:param name="currentPage">
					<s:property value="currentPage" />
				</s:param>
			</s:url>
			<s:if test="#session.session_id == null">
				<span class="float_l"><b>manager </b> <s:property value="subject"/></span>
			</s:if>
			<s:else>
			    <span class="float_l"><b>manager </b> <s:a href ="%{juviewURL}"><s:property value="subject"/></s:a></span>
			</s:else>	
				<span class="float_r date"><s:property value="regdate"/></span>
		</li>
		</s:iterator>
		<s:if test="#session.session_gender == '여자'" >
		<s:iterator value="ladylist" status="stat">
		<li>
			<s:url id="ladyviewURL" action="ladyViewAction" >
				<s:param name="no">
					<s:property value="no" />
				</s:param> 
				<s:param name="currentPage">
					<s:property value="currentPage" />
				</s:param>
			</s:url>
			<s:if test="#session.session_id == null">
				<span class="float_l"><b>lady</b> <s:property value="subject"/></span>
			</s:if>
			<s:else>
			    <span class="float_l"><b>lady</b> <s:a href ="%{ladyviewURL}"><s:property value="subject"/></s:a></span> 
			</s:else>	
				<span class="float_r date"><s:property value="regdate"/></span>
		</li>
		</s:iterator>
		</s:if>
		<s:if test="#session.session_gender == '남자'" >
		<s:iterator value="manlist" status="stat">
		<li>
			<s:url id="manviewURL" action="MviewAction" >
				<s:param name="no">
					<s:property value="no" />
				</s:param> 
				<s:param name="currentPage">
					<s:property value="currentPage" />
				</s:param>
			</s:url>
			<s:if test="#session.session_id == null">
				<span class="float_l"><b>man</b> <s:property value="subject"/></span>
			</s:if>
			<s:else>
			 	<span class="float_l"><b>man</b> <s:a href ="%{manviewURL}"><s:property value="subject"/></s:a></span>
			</s:else>
				<span class="float_r date"><s:property value="regdate"/></span>
		</li>
		</s:iterator>
		</s:if>
		</ul>
</div><!-- //newAll -->
							
<div class="reviewImgArea">
	<h3 class="mar_b_20">REVIEW LIST</h3>
	<s:if test="reviewlist.size() <= 0">
		<p class="align_c mar_b_20">등록된 게시물이 없습니다</p>
	</s:if>
	<s:iterator value="reviewlist" status="stat">
	<div class="reviewList">
		<s:url id="viewURL" action="reviewViewAction" >
			<s:param name="no">
				<s:property value="no" />
			</s:param> 
			<s:param name="currentPage">
				<s:property value="currentPage" />
			</s:param>
		</s:url>
		<div class="image">
			<s:if test="file_savname == null">
				
				 <s:if test="#session.session_id==null">
			    	<p class="align_c noImg">?</p>
			    </s:if>
			    <s:else>
			    	<s:a href ="%{viewURL}">
					<p class="align_c noImg">?</p>
					</s:a> 
			    </s:else>
			</s:if>
			<s:else>
			    <s:if test="#session.session_id==null">
			    	<img src="C:\\project_file\\reviewboard\\<s:property value="file_savname"/>" />
			    </s:if>
			    <s:else>
			    	<s:a href ="%{viewURL}">
					<img src="C:\\project_file\\reviewboard\\<s:property value="file_savname"/>" />
					</s:a> 
			    </s:else>
			</s:else>
		</div><!-- image -->
			<p class="align_c subject"><s:property value="subject"/></p>
	</div><!-- reviewList -->
	</s:iterator>
</div><!-- //reviewImgArea -->
